// 取出来调用后端接口的地址
import { API_CONFIG } from "../config/index.js";
import request from "../api/index.js";
// 在很多位置，都可能用到同一个接口, data: {}
export const getSecretListHandler = (data) => {
    return request(API_CONFIG.getSecretListApi, data, "get", "2000")
}

export const deleteSecretHandler = (clusterId, namespace, name) => {
    return request(API_CONFIG.deleteSecretApi, {clusterId, namespace, name}, "post", "2000")
}
// 
export const createSecretHandler = (data) => {
    return request(API_CONFIG.createSecretApi, data, "post", "2000")
}

export const updateSecretHandler = (data) => {
    return request(API_CONFIG.updateSecretApi, data, "post", "2000")
}

export const getSecretDetailHandler = (data) => {
    return request(API_CONFIG.getSecretApi, data, "get", "2000")
}